package protobuf {
	import com.netease.protobuf.*;
	use namespace com.netease.protobuf.used_by_generated_code;
	import com.netease.protobuf.fieldDescriptors.*;
	import flash.utils.Endian;
	import flash.utils.IDataInput;
	import flash.utils.IDataOutput;
	import flash.utils.IExternalizable;
	import flash.errors.IOError;
	import protobuf.TNMT_BASE_INFO;
	import protobuf.BLIND_INFO;
	import protobuf.TNMT_BONUS;
	// @@protoc_insertion_point(imports)

	// @@protoc_insertion_point(class_metadata)
	public dynamic final class HSPKG_TNMT_DETAIL_ACK extends com.netease.protobuf.Message {
		/**
		 *  @private
		 */
		public static const TOURNAMENT_ID:FieldDescriptor$TYPE_UINT64 = new FieldDescriptor$TYPE_UINT64("protobuf.HSPKG_TNMT_DETAIL_ACK.tournament_id", "tournamentId", (1 << 3) | com.netease.protobuf.WireType.VARINT);

		public var tournamentId:UInt64;

		/**
		 *  @private
		 */
		public static const DETAIL:FieldDescriptor$TYPE_MESSAGE = new FieldDescriptor$TYPE_MESSAGE("protobuf.HSPKG_TNMT_DETAIL_ACK.detail", "detail", (2 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.TNMT_BASE_INFO);

		public var detail:protobuf.TNMT_BASE_INFO;

		/**
		 *  @private
		 */
		public static const BLINDS:RepeatedFieldDescriptor$TYPE_MESSAGE = new RepeatedFieldDescriptor$TYPE_MESSAGE("protobuf.HSPKG_TNMT_DETAIL_ACK.blinds", "blinds", (3 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.BLIND_INFO);

		[ArrayElementType("protobuf.BLIND_INFO")]
		public var blinds:Array = [];

		/**
		 *  @private
		 */
		public static const BONUS:RepeatedFieldDescriptor$TYPE_MESSAGE = new RepeatedFieldDescriptor$TYPE_MESSAGE("protobuf.HSPKG_TNMT_DETAIL_ACK.bonus", "bonus", (4 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED, protobuf.TNMT_BONUS);

		[ArrayElementType("protobuf.TNMT_BONUS")]
		public var bonus:Array = [];

		/**
		 *  @private
		 */
		public static const DESCRIBE:FieldDescriptor$TYPE_STRING = new FieldDescriptor$TYPE_STRING("protobuf.HSPKG_TNMT_DETAIL_ACK.describe", "describe", (5 << 3) | com.netease.protobuf.WireType.LENGTH_DELIMITED);

		private var describe$field:String;

		public function clearDescribe():void {
			describe$field = null;
		}

		public function get hasDescribe():Boolean {
			return describe$field != null;
		}

		public function set describe(value:String):void {
			describe$field = value;
		}

		public function get describe():String {
			return describe$field;
		}

		/**
		 *  @private
		 */
		public static const TOTAL_CHIPS:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.HSPKG_TNMT_DETAIL_ACK.total_chips", "totalChips", (6 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var total_chips$field:Number;

		private var hasField$0:uint = 0;

		public function clearTotalChips():void {
			hasField$0 &= 0xfffffffe;
			total_chips$field = new Number();
		}

		public function get hasTotalChips():Boolean {
			return (hasField$0 & 0x1) != 0;
		}

		public function set totalChips(value:Number):void {
			hasField$0 |= 0x1;
			total_chips$field = value;
		}

		public function get totalChips():Number {
			return total_chips$field;
		}

		/**
		 *  @private
		 */
		public static const MIN_CHIPS:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.HSPKG_TNMT_DETAIL_ACK.min_chips", "minChips", (7 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var min_chips$field:Number;

		public function clearMinChips():void {
			hasField$0 &= 0xfffffffd;
			min_chips$field = new Number();
		}

		public function get hasMinChips():Boolean {
			return (hasField$0 & 0x2) != 0;
		}

		public function set minChips(value:Number):void {
			hasField$0 |= 0x2;
			min_chips$field = value;
		}

		public function get minChips():Number {
			return min_chips$field;
		}

		/**
		 *  @private
		 */
		public static const MAX_CHIPS:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.HSPKG_TNMT_DETAIL_ACK.max_chips", "maxChips", (8 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var max_chips$field:Number;

		public function clearMaxChips():void {
			hasField$0 &= 0xfffffffb;
			max_chips$field = new Number();
		}

		public function get hasMaxChips():Boolean {
			return (hasField$0 & 0x4) != 0;
		}

		public function set maxChips(value:Number):void {
			hasField$0 |= 0x4;
			max_chips$field = value;
		}

		public function get maxChips():Number {
			return max_chips$field;
		}

		/**
		 *  @private
		 */
		public static const AVERAGE_CHIPS:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.HSPKG_TNMT_DETAIL_ACK.average_chips", "averageChips", (9 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		private var average_chips$field:Number;

		public function clearAverageChips():void {
			hasField$0 &= 0xfffffff7;
			average_chips$field = new Number();
		}

		public function get hasAverageChips():Boolean {
			return (hasField$0 & 0x8) != 0;
		}

		public function set averageChips(value:Number):void {
			hasField$0 |= 0x8;
			average_chips$field = value;
		}

		public function get averageChips():Number {
			return average_chips$field;
		}

		/**
		 *  @private
		 */
		public static const RUNNINGTIME:FieldDescriptor$TYPE_UINT32 = new FieldDescriptor$TYPE_UINT32("protobuf.HSPKG_TNMT_DETAIL_ACK.runningtime", "runningtime", (10 << 3) | com.netease.protobuf.WireType.VARINT);

		public var runningtime:uint;

		/**
		 *  @private
		 */
		public static const TOTAL_BONUS:FieldDescriptor$TYPE_DOUBLE = new FieldDescriptor$TYPE_DOUBLE("protobuf.HSPKG_TNMT_DETAIL_ACK.total_bonus", "totalBonus", (11 << 3) | com.netease.protobuf.WireType.FIXED_64_BIT);

		public var totalBonus:Number;

		/**
		 *  @private
		 */
		override used_by_generated_code final function writeToBuffer(output:com.netease.protobuf.WritingBuffer):void {
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 1);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT64(output, this.tournamentId);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 2);
			com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, this.detail);
			for (var blinds$index:uint = 0; blinds$index < this.blinds.length; ++blinds$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 3);
				com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, this.blinds[blinds$index]);
			}
			for (var bonus$index:uint = 0; bonus$index < this.bonus.length; ++bonus$index) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 4);
				com.netease.protobuf.WriteUtils.write$TYPE_MESSAGE(output, this.bonus[bonus$index]);
			}
			if (hasDescribe) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.LENGTH_DELIMITED, 5);
				com.netease.protobuf.WriteUtils.write$TYPE_STRING(output, describe$field);
			}
			if (hasTotalChips) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 6);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, total_chips$field);
			}
			if (hasMinChips) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 7);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, min_chips$field);
			}
			if (hasMaxChips) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 8);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, max_chips$field);
			}
			if (hasAverageChips) {
				com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 9);
				com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, average_chips$field);
			}
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.VARINT, 10);
			com.netease.protobuf.WriteUtils.write$TYPE_UINT32(output, this.runningtime);
			com.netease.protobuf.WriteUtils.writeTag(output, com.netease.protobuf.WireType.FIXED_64_BIT, 11);
			com.netease.protobuf.WriteUtils.write$TYPE_DOUBLE(output, this.totalBonus);
			for (var fieldKey:* in this) {
				super.writeUnknown(output, fieldKey);
			}
		}

		/**
		 *  @private
		 */
		override used_by_generated_code final function readFromSlice(input:flash.utils.IDataInput, bytesAfterSlice:uint):void {
			var tournament_id$count:uint = 0;
			var detail$count:uint = 0;
			var describe$count:uint = 0;
			var total_chips$count:uint = 0;
			var min_chips$count:uint = 0;
			var max_chips$count:uint = 0;
			var average_chips$count:uint = 0;
			var runningtime$count:uint = 0;
			var total_bonus$count:uint = 0;
			while (input.bytesAvailable > bytesAfterSlice) {
				var tag:uint = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
				switch (tag >> 3) {
				case 1:
					if (tournament_id$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.tournamentId cannot be set twice.');
					}
					++tournament_id$count;
					this.tournamentId = com.netease.protobuf.ReadUtils.read$TYPE_UINT64(input);
					break;
				case 2:
					if (detail$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.detail cannot be set twice.');
					}
					++detail$count;
					this.detail = new protobuf.TNMT_BASE_INFO();
					com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, this.detail);
					break;
				case 3:
					this.blinds.push(com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, new protobuf.BLIND_INFO()));
					break;
				case 4:
					this.bonus.push(com.netease.protobuf.ReadUtils.read$TYPE_MESSAGE(input, new protobuf.TNMT_BONUS()));
					break;
				case 5:
					if (describe$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.describe cannot be set twice.');
					}
					++describe$count;
					this.describe = com.netease.protobuf.ReadUtils.read$TYPE_STRING(input);
					break;
				case 6:
					if (total_chips$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.totalChips cannot be set twice.');
					}
					++total_chips$count;
					this.totalChips = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 7:
					if (min_chips$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.minChips cannot be set twice.');
					}
					++min_chips$count;
					this.minChips = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 8:
					if (max_chips$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.maxChips cannot be set twice.');
					}
					++max_chips$count;
					this.maxChips = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 9:
					if (average_chips$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.averageChips cannot be set twice.');
					}
					++average_chips$count;
					this.averageChips = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				case 10:
					if (runningtime$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.runningtime cannot be set twice.');
					}
					++runningtime$count;
					this.runningtime = com.netease.protobuf.ReadUtils.read$TYPE_UINT32(input);
					break;
				case 11:
					if (total_bonus$count != 0) {
						throw new flash.errors.IOError('Bad data format: HSPKG_TNMT_DETAIL_ACK.totalBonus cannot be set twice.');
					}
					++total_bonus$count;
					this.totalBonus = com.netease.protobuf.ReadUtils.read$TYPE_DOUBLE(input);
					break;
				default:
					super.readUnknown(input, tag);
					break;
				}
			}
		}

	}
}
